#include "stdafx.h"

DESCRIPTION_11_TEST_SUITE(ShaderBufferExViewDescription)

BOOST_FIXTURE_TEST_CASE(Default, TestShaderBufferExViewDescription)
{
	BOOST_REQUIRE_EQUAL(D3D11_SRV_DIMENSION_BUFFEREX, m_desc.ViewDimension);
	BOOST_REQUIRE_EQUAL(DXGI_FORMAT_UNKNOWN, m_desc.Format);
	BOOST_REQUIRE_EQUAL(0, m_desc.BufferEx.FirstElement);
	BOOST_REQUIRE_EQUAL(~0U, m_desc.BufferEx.NumElements);
	BOOST_REQUIRE_EQUAL(0, m_desc.BufferEx.Flags);
}

#define SHADER_BUFFER_EX_VIEW_DESCRIPTION_TEST_CASE(type_, name_, value_)	\
	DESCRIPTION_11_SETTER_FIXTURE_TEST_CASE(name_##_, ShaderBufferExViewDescription,	\
		type_, value_, BufferEx.name_)

SHADER_BUFFER_EX_VIEW_DESCRIPTION_TEST_CASE(UINT, FirstElement, 2)
SHADER_BUFFER_EX_VIEW_DESCRIPTION_TEST_CASE(UINT, NumElements, 2)
SHADER_BUFFER_EX_VIEW_DESCRIPTION_TEST_CASE(UINT, Flags, D3D11_BUFFEREX_SRV_FLAG_RAW)

BOOST_AUTO_TEST_SUITE_END()
